﻿using System;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace TeamFranceTriple
{
    public partial class ThrowError : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            throw new ApplicationException("Fro : let's throw an error !");
        }

        //protected void CustomChallengeResponse(object sender, AjaxControlToolkit.NoBotEventArgs e)
        //{
        //    Panel p = new Panel();
        //    p.ID = "NoBotPanel";
        //    Random rand = new Random();
        //    p.Width = rand.Next(300);
        //    p.Height = rand.Next(200);
        //    p.Style.Add(HtmlTextWriterStyle.Visibility, "hidden");
        //    p.Style.Add(HtmlTextWriterStyle.Position, "absolute");
        //    ((AjaxControlToolkit.NoBot)sender).Controls.Add(p);
        //    e.ChallengeScript = string.Format("var e = document.getElementById('{0}'); e.offsetWidth * e.offsetHeight;", p.ClientID);
        //    e.RequiredResponse = (p.Width.Value * p.Height.Value).ToString();
        //}

    }
}